package com.springboot.demo.service;

import com.springboot.demo.entity.ReturnMsg;
import com.springboot.demo.mapper.ReturnManageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReturnMsgService {
    @Autowired
    ReturnManageMapper returnManageMapper;

    public List<ReturnMsg> getReturnMsg(){
        return returnManageMapper.getAllreturnMsg();
    }

    public void Inserfine(String phone,int fine,String time,long bookid){
        returnManageMapper.insertfine(phone,fine,time,bookid);
    }

    public void returnbook(long bookid){
        returnManageMapper.returnbook(bookid);
    }

    public void updateborrow(String phone,long bookid,String starttime){returnManageMapper.updateborrow(phone, bookid, starttime);}

    public void updatereturn(String phone,long bookid,String starttime){returnManageMapper.updatereturn(phone, bookid, starttime);}
}
